package com.lzh.crm.service.impl;

import com.lzh.crm.mapper.EmployeeMapper;
import com.lzh.crm.pojo.Employee;
import com.lzh.crm.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper emMapper;

    @Override
    public void insert(Employee em) {
        emMapper.insert(em);
    }

    @Override
    public void delete(Integer emId) {
        emMapper.delete(emId);
    }

    @Override
    public void update(Employee em) {
        emMapper.update(em);
    }

    @Override
    public List<Employee> selectAll() {
        return emMapper.selectAll();
    }

    @Override
    public List<Employee> selectNeed(Employee em) {
        return emMapper.selectNeed(em);
    }
}
